<template>
	<!-- 标题 -->
	<div id="sytitle">
		<div class="sytitleBox">
			<a class="title mhover" :href='Path+records[0]?.url'>{{records&&records[0]?.title}}</a>
			<div class="flex tips">
				<a class="tipsp mhover" :href='Path+records[1]?.url'>{{records&&records[1]?.title}}</a>
				<a class="tipsp mhover" :href='Path+records[2]?.url'>{{records&&records[2]?.title}}</a>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				title: '习近平：切实加强基础研究 夯实科技自立自强根基',
				tips1: '中共中央政治局就加强基础研究进行第三次集体学习习近平主持学习',
				tips2: '各级党委和政府要把加强基础研究纳入科技工作重要日程，加强统筹协调，加大政策支持，推动基础研究实现高质量发展',
				params:{
					pageSize: 10,
					pageNum:1,
					typeIdStr:1501,
				},
				records:[{
					title:''
				},
				{
					title:''
				},
				{
					title:''
				}],
				Path:getRootPath(),
			}
		},
		created() {

		},
		mounted() {
			this.headline();
		},
		methods:{
			setNumber(val){
				let value = val;
				if(value>=1000){
					value = value/1000+'K';
				}else if(value>=10000){
					value = value/1000+'W';
				}
				return value
			},
			headline(){
				let param = {
					orderBy: 1,
					typeIdStr: '1501',
					pageSize:3,
					pageNum:1
				};
				contentApi.fetchContentOfChannel(param, res => {
					if (res.code == '00000 00000') {
							this.records = res.data.records;
							}
					})
			},
			changes(){
				this.params.pageNum=this.params.pageNum==1?2:1
				this.hotSort()
			}
		}
	}
</script>

<style>
	#sytitle {
	  width: 1200px;
	}
	#sytitle .sytitleBox {
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  justify-content: center;
	}
	#sytitle .sytitleBox .title {
	  display: block;
	  height: 48px;
	  font-size: 48px;
	  font-weight: 600;
	  color: #333;
	  line-height: 48px;
	  cursor: pointer;
	  white-space: nowrap;
	  overflow: hidden;
	  width: 100%;
	  text-overflow: ellipsis;
	}
	#sytitle .sytitleBox .title:hover {
	  color: #FF3333;
	}
	#sytitle .sytitleBox .tips {
	  margin-top: 24px;
	  height: 14px;
	  font-size: 14px;
	  font-weight: 400;
	  color: #999999;
	  line-height: 14px;
	}
	#sytitle .sytitleBox .tips .tipsp {
	  margin-left: 24px;
	  cursor: pointer;
	  color: #999999;
	  white-space: nowrap;
	  overflow: hidden;
	  width: 50%;
	  text-overflow: ellipsis;
	}
	#sytitle .sytitleBox .tips .tipsp:hover {
	  color: #FF3333;
	}
	#sytitle .sytitleBox .tips .tipsp:first-child {
	  margin-left: 0;
	}

</style>